package com.cjh.wxdemoserver.base.enums;

import com.cjh.wxdemoserver.base.exception.ResultCode;

/**
 * @author ChenJH
 * @description 公共响应code
 */

public enum CommonResultCode implements ResultCode {
    UNKNOWN_ERROR(-999, "未知异常"),
    BIZ_ERROR(-1, "业务异常：{0}"),
    SUCCESS(1, "成功"),
    ;

    private final int code;
    private final String msg;

    CommonResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
